Skip to content

fix: home assistant proxy #1235#1239

Merged
flobz merged 2 commits into
masterfrom
fix/proxy
Jun 30, 2026
Merged

fix: home assistant proxy #1235#1239
flobz merged 2 commits into
masterfrom
fix/proxy

Conversation

@flobz

@flobz flobz commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Use dash_app.get_asset_url() to ensure image paths respect the X-Ingress-Path header (requests_pathname_prefix).

Changes

  • Update all SVG image paths in control.py, figures.py, and views.py to use get_asset_url() instead of hardcoded 'assets/images/...' paths
  • Add test_svg_images_with_ingress_path() to verify image paths contain the correct prefix when X-Ingress-Path header is present

Fixes

Image paths were not prefixed in Home Assistant ingress proxy setups, causing 404 errors for SVG images.

Test

New integration test validates that all image src attributes in the HTML output contain the correct ingress prefix.

@flobz flobz changed the title test: add test for svg image paths with HA ingress prefix fix: home assistant proxy #1235 Jun 25, 2026
flobz added 2 commits June 30, 2026 15:05
Use dash_app.get_asset_url() to ensure image paths respect the
X-Ingress-Path header (requests_pathname_prefix).

- Update all SVG image paths in control.py, figures.py, and views.py
  to use get_asset_url() instead of hardcoded 'assets/images/...' paths
- Add test_svg_images_with_ingress_path() to verify image paths
  contain the correct prefix when X-Ingress-Path header is present

Fixes issue where image paths were not prefixed in Home Assistant
ingress proxy setups.
@flobz flobz merged commit 0089bd6 into master Jun 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant